﻿using CommunityToolkit.Mvvm.ComponentModel;
namespace Klear.Library.Models;
using SQLite;
[Table("category")] 
public class CategoryModel : ObservableObject
{
    [PrimaryKey, AutoIncrement]
    [Column("category_id"), NotNull]
    public int CategoryId { get; set; }
    [Column("category_name"), NotNull]
    public string CategoryName { get; set; }
    [Column("category_type"), NotNull]
    public CategoryType CategoryType { get; set; }
    
    // 有参构造函数
    public CategoryModel(int categoryId, string categoryName, CategoryType categoryType) {
        CategoryId = categoryId;
        CategoryName = categoryName;
        CategoryType = categoryType;
    }

    public CategoryModel() {
        
    }

    
}

public enum CategoryType
{
    Expense,
    Income
}